package org.xindian.lbstest.lbs;

public class CDMACell implements Comparable<CDMACell> {
	public int lat = 2147483647;
	public int lon = 2147483647;
	public int stationId = -1;
	public int networkId = -1;
	public int systemId = -1;
	public long time = 0L;
	
	//@Override
	public int compareTo(CDMACell another) {
		if (this.time == another.time)
			return 0;
		if (this.time < another.time) {
			return 1;
		}
		return -1;
	}

	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof CDMACell)) {
			return false;
		}
		CDMACell cell = (CDMACell) o;

		return (this.stationId == cell.stationId)
				&& (this.networkId == cell.networkId)
				&& (this.systemId == cell.systemId);
	}

	public int hashCode() {
		int result = 17;
		result = 31 * result + this.stationId;
		result = 31 * result + this.networkId;
		result = 31 * result + this.systemId;
		return result;
	}
}
